﻿IF EXISTS (SELECT * from sys.procedures p left join sys.schemas s on p.schema_id = s.schema_id where p.name='search_insert' and s.name='Meta')
DROP PROCEDURE [Meta].search_insert
GO
CREATE PROCEDURE [Meta].search_insert 
@PK uniqueidentifier, 
@DisplayName nvarchar(50), 
@ItemType varchar(30), 
@SearchField nvarchar(450)
AS
BEGIN
INSERT INTO [Meta].[Search]
([id_reference], [display_name], [item_type], [search_field])
VALUES (@PK,@DisplayName,@ItemType,@SearchField)
END